import request from '@/utils/request'
import qs from 'qs'

// 获取打印机区域
export function printerAreaList (pageNumber, pageSize, data) {
  return request({
    url: '/print/print_area/list_rewrite',
    method: 'get',
    params: {
      storeId: sessionStorage.getItem('storeId'),
      pageNumber,
      pageSize,
    }
  })
}

// 添加打印区域
export function printerAreaAdd (printerArea) {
  return request({
    url: '/print/print_area/save',
    method: 'post',
    data: qs.stringify(
      printerArea
    )
  })
}

// 修改打印区域
export function printerAreaUpdate (printerArea) {
  return request({
    url: '/print/print_area/update',
    method: 'post',
    data: qs.stringify(
      printerArea
    )
  })
}

// 删除打印区域
export function printerAreaLogicalDel (ids) {
  // console.log(ids);
  return request({
    url: '/print/print_area/logical_del',
    method: 'post',
    data: qs.stringify({
      ids,
    }, {indices: false})
  })
}



